dd = delete line
u = undo
p = paste (#p)
yy = "yank" copy line (#yy)
G = end of file
#G = go to line #
:#d = delete line (#,# = range)
:#y = copy line (#, # = range)
:set nu = set line numbers
:% = entire file
:#,#j - remove newlines
:%s/pattern.match/replacement
:%s/pattern.match/replacement /g = Replace ALL instances
^ = start of line
$ = end of line
i = insert at cursor
I = insert at start of line
a = insert after cursor
A = insert end of line
o = insert below line
O = insert above line
:! <command> = execute command
locate - Searches database
- updatedb
to update database before using
find - Crawls the filesystem
- find / -iname filename
which - show location of binary
whereis - shows binary and location of package
tr - Translate file contents
tr '<value>' '<replacement>' < file
- Replace specified value
tr '[:upper:]' '[:lower:]'
tr -s 'char'
- Squeezetr -d
- Deletewc - Word Count
wc -w
= Word countwc -l
= Count newlineswc- c
= Byte countwc -m
= Character countcut
sort
diff
awk
sed
ln = Create hard or symbolic links
Hard links apply to files only
Symbolic links apply to directories
stdin=0
stout=1
stderr=2
>
>>
< = Take as input
<< = Here string (read until terminated)
- cat <<EOF (Keep reading until end of file)
<<< = Input, keep formatting
2>/dev/null = Send to nowhere. Get rid of junk output.
& = Background
&& = AND
|| = OR
$( ) = Do first
` ` = Do first